]> dgit.raspbian.org Git - gnome-shell.git/commit
st: Use scaled surfaces for creating cairo background shadows
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Mon, 25 Feb 2019 12:45:02 +0000 (13:45 +0100)
committerJonas Ådahl <jadahl@gmail.com>
Fri, 1 Mar 2019 17:12:52 +0000 (17:12 +0000)
commit5617ffc79ceb3acb291332879cbbe161cea0a316
tree694a5071dde0e8c11c7036635c54622b03fa9162
parentca4d86e9e549982761d07a3e48320f20e2383343
st: Use scaled surfaces for creating cairo background shadows

Create the surfaces for background shadows at scaled sizes and then draw on them
using logical coordinates, by setting the surface device scale accordingly.

Use the said surface scale when generating the actual shadow cairo pattern
but in such case, to reduce the number of code changes, is better to work in
absolute coordinates, and to do so:
  1) Create a temporary shadow-spec copy with scaled values to absolute sizes
  2) Invert the scaling on the shadow matrix
  3) Do the actual painting in absolute coordinates
  4) Set the shadow matrix scaling back to the logical coordinates.

Finally scale down the created shadow pattern surface size when painting it,
applying again a reverse scale to the matrix.

https://bugzilla.gnome.org/show_bug.cgi?id=765011
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/5
src/st/st-private.c
src/st/st-theme-node-drawing.c